From: Guillaume Desmottes Date: Thu, 7 Jul 2011 13:35:37 +0000 (+0200) Subject: messageTray.js: raise an exception only if parseInt(count) returns NaN X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8096 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6cb707cc4fa391f0f64710cc223e514a9b05ac5f;p=gnome-shell.git messageTray.js: raise an exception only if parseInt(count) returns NaN 0 is a valid value for count so we should accept it. https://bugzilla.gnome.org/show_bug.cgi?id=654139 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index a29dedebd..bd55a3133 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -941,7 +941,7 @@ Source.prototype = { }, _setCount: function(count, visible) { - if (!parseInt(count)) + if (isNaN(parseInt(count))) throw new Error("Invalid notification count: " + count); this._counterBin.visible = visible;